#include "SparseGraph.h"
#include<iostream>
#include <stdio.h>
int main(int argc, char const *argv[])
{
    int N=20;
    int M=100;
    SparseGraph g1(N,false);
    for (int i = 0; i < M; i++)
    {
        int a=rand()%N;
        int b=rand()%N;
        g1.addEdge(a,b);
        /* code */
    }
    for (int v = 0; v < N; v++)
    {
        cout<<v<<":";
        SparseGraph::adjIterator adj(g1,v);
        for (int w = adj.begin(); !adj.end(); w=adj.next()){
            cout<<w<<",";
            /* code */
        }
        cout<<endl;
    }
    return 0;
}
